import request from '@/utils/request'

export function getPermission() { // 获取权限点列表
  return request.get('/sys/permission')
}

export function addPermission(data) { // 获取权限点列表
  return request.post('/sys/permission', data)
}

export function detailsPermission(id) { // 获取权限点详情
  return request.get(`/sys/permission/${id}`)
}

export function editPermission(data) { // 编辑权限，更改数据
  return request({
    url: `/sys/permission/${data.id}`,
    method: 'put',
    data
  })
}

export function delPermission(id) { // 刪除权限请求
  return request.delete(`/sys/permission/${id}`)
}
